﻿using BCEntity.CRM.BigCustomerGroup;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.CRM.BigCustomerGroup
{
    public interface IBigCustomerGroupData
    {

        /// <summary>
        /// 删除大客户组记录
        /// </summary>
        /// <param name="bigCustomerGroupId"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(long bigCustomerGroupId);

        /// <summary>
        /// 获取大客户组记录
        /// </summary>
        /// <param name="bigCustomerGroupId"></param>
        /// <returns></returns>
        Task<BigCustomerGroupEntity> GetEntityAsync(long bigCustomerGroupId);

        /// <summary>
        /// 获取大客户组列表 分页
        /// </summary>
        /// <param name="companyId"></param>
        /// <param name="bigCustomerGroupName"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<BigCustomerGroupEntity>, int)> GetListAsync(int? companyId, string bigCustomerGroupName, int pageIndex, int pageSize);
        /// <summary>
        /// 添加新大客户组纪录
        /// </summary>
        /// <param name="bigCustomerGroupEntity"></param>
        /// <returns></returns>
        Task<BigCustomerGroupEntity> InsertAsync(BigCustomerGroupEntity entity);

        /// <summary>
        /// 修改大客户组记录
        /// </summary>
        /// <param name="bigCustomerGroupEntity"></param>
        /// <returns></returns>
        Task<BigCustomerGroupEntity> UpdateAsync(BigCustomerGroupEntity entity);

        /// <summary>
        /// 获取大客户组列表
        /// </summary>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Task<IEnumerable<BigCustomerGroupEntity>> GetOnlyList(int? companyId);
    }
}